package org.vacoor.nothing.misc.express.usps.api.track.field;

import org.vacoor.nothing.misc.express.usps.api.UspsRequest;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
@XmlRootElement(name = "TrackFieldRequest")
public class TrackFieldRequest extends UspsRequest {
    @XmlElement(name = "ClientIp")
    private String clientIp;        // required when revision = 1
    @XmlElement(name = "SourceId")
    private String sourceId;        // required when revision = 1
    @XmlElement(name = "TrackID")
    private List<TrackFieldId> trackFieldIds;

    /* **********************
     *       Factory
     * **********************/

    public static TrackFieldRequest create() {
        return new TrackFieldRequest();
    }

    /* **********************
     *      Constructor
     * **********************/

    private TrackFieldRequest() {
        // this("1");
        this(null);
    }

    private TrackFieldRequest(String revision) {
        super(revision);
    }

    /* ************************
     *        Methods
     * ************************/

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getSourceId() {
        return sourceId;
    }

    public void setSourceId(String sourceIp) {
        this.sourceId = sourceIp;
    }

    public List<TrackFieldId> getTrackFieldIds() {
        return trackFieldIds;
    }

    public void setTrackFieldIds(List<TrackFieldId> trackFieldIds) {
        this.trackFieldIds = trackFieldIds;
    }
}
